#include <iostream>
#include <numeric>
#include <vector>
#include <functional>

using namespace std;

#define MAX 10

vector<long> v(MAX);

int main()
{
    for (int i = 0; i < MAX; i++)
        v[i] = i + 1;

    long sum = accumulate(v.begin(), v.end(), 0);
    cout << "sum of values == " << sum << endl;

    long product = accumulate(v.begin(), v.end(), 1, multiplies<long>());
    cout << "product of values == " << product << endl;

    return 0;
}

